home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / clang / tasm_vid.zip / VIDEO.DOC < prev    next >
Text File  |  1991-03-25  |  7KB  |  276 lines

  1.  
  2. Module   : VIDEO.ASM - Direct Video Access Routines for TASM Version 1
  3. Author   : Dave Bennett
  4. Version  : 1.0
  5. Date     : 11/9/88
  6. CIS PPN  : 74635,1671
  7. FidoNet  : 1:280/307
  8. Internet : kcufgat@fidonet.org
  9.  
  10. Description:
  11. ------------
  12.  
  13.   This is a module of FAST direct video routines for TASM.  At this time they
  14.   are released to the public domain.  Much thanks to Brian Foley for
  15.   FASTWR.PAS (Turbo Pascal V3 Inline Assember Screen Routines) which gave much
  16.   insight on screen positioning and snow suppresion (horiz retrace waiting)
  17.  
  18.   These routines are dying to have someone write an accompaning windowing
  19.   module... (hint hint)
  20.  
  21.   Please contact me a tell me what you think via EPlex, IBMNET, Borland
  22.   forums etc...  I am very interested in your opinions, bug reports, etc..
  23.  
  24.   --Dave
  25.  
  26. Files in the distributed archive
  27. --------------------------------
  28.  
  29.   Name     Ext    Size      Description
  30.   ----     ---    -----     -----------
  31.   VIDDEMO  ASM    20487     Demonstration program
  32.   VIDEO    ASM    26416     Video routines
  33.   VIDEO    DOC     6792     This file
  34.   VIDDEMO  EXE     2662     Compiled video demo (Not bad for 2.5K!)
  35.   VIDEO    INC     2366     Global Declareations & equates for VIDEO.ASM
  36.   VIDDEMO  MAK      165     Turbo Make file for VIDDEMO.EXE
  37.  
  38. Features:
  39. ---------
  40.  
  41.   - Video mode detection
  42.   - Monochrome/CGA/EGA support
  43.   - Snow suppression
  44.   - Direct character & string writing
  45.   - Screen saving & restoring
  46.   - Area fills (character, attribute, and both)
  47.   - Cursor on & off control
  48.   - All commands w/ or w/o attribute changes
  49.  
  50.  
  51. Global Data:
  52. ------------
  53.  
  54.   BaseOfScreen          Word value set by GetVideoMode proc.  This is
  55.             set to B800h / B000h depending video mode.
  56.  
  57.   SnowCheck             Byte value set by GetVideoMode.  Set to 1 if
  58.             adapter is CGA (Not EGA) by default.  Mono and
  59.             EGA cards will set this to 0 by default.
  60.  
  61.   VideoMode             Video mode set by GetVideoMode.  This holds the
  62.             video mode at the time of the last GetVideoMode
  63.             call (Set by BIOS INT 10 func 0Fh).
  64.  
  65.  
  66. Global Procedures:
  67. ------------------
  68.  
  69. Note: No routines preserve the flags register!
  70.  
  71. See VIDDEMO.ASM for examples of all routines,  all references to this module
  72. and VIDEO.INC have been highlighted with a ($) so that you may better
  73. scan VIDDEMO.ASM for examples of how to apply these routines.  --Dave
  74.  
  75.  
  76.   EGAInstalled
  77.   ------------
  78.     This procedure checks to see if the current adapter card is an
  79.     EGA.
  80.  
  81.     Output
  82.       AL = 1 if EGA Adapter is found / 0 if not
  83.  
  84.     Modified
  85.       AX
  86.  
  87.  
  88.   GetVideoMode
  89.   ------------
  90.     This procedure checks the video mode and sets the BaseOfScreen
  91.     accordingly.  It also sets SnowCheck to 1 if adapter is a CGA.
  92.  
  93.     Output
  94.       BaseOfScreen
  95.       VideoMode
  96.       SnowCheck
  97.  
  98.     Uses
  99.       EGAInstalled
  100.  
  101.  
  102.   DWriteCH
  103.   --------
  104.     Writes a character to the screen using direct memory access.
  105.  
  106.     *** IMPORTANT -- CALL GetVideoMode Before using this routine!
  107.  
  108.     Input
  109.       AH      Row on screen 1-25
  110.       AL      Column on screen 1-80
  111.       BH      Video Attribute
  112.       BL      Character
  113.       CX      Number of times
  114.  
  115.     Output
  116.       Screen memory (B000:0000 or 8000 CGA/MONO
  117.  
  118.  
  119.   DWriteCHNA
  120.   ----------
  121.     Writes a character to the screen using direct memory access.
  122.     This procedure does not disturb current attr setting.
  123.  
  124.     *** IMPORTANT -- CALL GetVideoMode Before using this routine!
  125.  
  126.     Input
  127.       AH      Row on screen 1-25
  128.       AL      Column on screen 1-80
  129.       BL      Character
  130.       CX      Number of times
  131.  
  132.     Output
  133.       Screen memory (B000:0000 or 8000 CGA/MONO
  134.  
  135.  
  136.     DWriteStr
  137.     ---------
  138.     This procedure writes a null delimited string to the screen using
  139.     direct memory access.
  140.  
  141.     *** IMPORTANT -- CALL GetVideoMode Before using this routine!
  142.  
  143.     Input
  144.       DS:SI   Null terminated string to print
  145.       AH      Row on screen 1-25
  146.       AL      Column on screen 1-80
  147.       BH      Video Attribute
  148.  
  149.     Output
  150.       Screen memory (B000:0000 or 8000 CGA/MONO
  151.  
  152.     Modifies
  153.       SI - Returns 1 byte past null of displayed string
  154.  
  155.  
  156.   DWriteStrNA
  157.   -----------
  158.     This procedure writes a null delimited string to the screen using
  159.     direct memory access, attribute is not changed.
  160.  
  161.     *** IMPORTANT -- CALL GetVideoMode Before using this routine!
  162.  
  163.     Input
  164.       DS:SI   Null terminated string to print
  165.       AH      Row on screen 1-25
  166.       AL      Column on screen 1-80
  167.  
  168.     Output
  169.       Screen memory (B000:0000 or 8000 CGA/MONO)
  170.  
  171.     Modifies
  172.       SI - Returns 1 byte past null of displayed string
  173.  
  174.  
  175.   DFillCH
  176.   -------
  177.     This procedure fills an area of the screen with the specified
  178.     character and attribute.
  179.  
  180.     *** IMPORTANT -- CALL GetVideoMode Before using this routine!
  181.  
  182.     Input
  183.       AH      = Top Row
  184.       AL      = Left Column
  185.       BH      = Number of rows
  186.       BL      = Number of columns
  187.       DH      = Attribute
  188.       DL      = Character
  189.  
  190.  
  191.   DFillCHNA
  192.   ---------
  193.     This procedure fills an area of the screen with the specified
  194.     character. Attribute remains the same.
  195.  
  196.     *** IMPORTANT -- CALL GetVideoMode Before using this routine!
  197.  
  198.     Input
  199.       AH      = Top Row
  200.       AL      = Left Column
  201.       BH      = Number of rows
  202.       BL      = Number of columns
  203.       DL      = Character
  204.  
  205.  
  206.   DFillAttr
  207.   ---------
  208.     This procedure fills an area of the screen with the specified
  209.     attribute. Character remains the same.
  210.  
  211.     *** IMPORTANT -- CALL GetVideoMode Before using this routine!
  212.  
  213.     Input
  214.       AH      = Top Row
  215.       AL      = Left Column
  216.       BH      = Number of rows
  217.       BL      = Number of columns
  218.       DH      = Attribute
  219.  
  220.  
  221.   StoreToMem
  222.   ----------
  223.     This procedure moves an image from the screen to the designated
  224.     memory area.
  225.  
  226.     *** IMPORTANT -- CALL GetVideoMode Before using this routine!
  227.  
  228.     Input
  229.       AH      = Top Row
  230.       AL      = Left Column
  231.       BH      = Number of rows
  232.       BL      = Number of columns
  233.       ES:DI   = Memory Destination
  234.  
  235.     Modifies
  236.       DI
  237.  
  238.  
  239.   StoreToScr
  240.   ----------
  241.     This procedure moves an image from memory to the designated
  242.     screen location.
  243.  
  244.     *** IMPORTANT -- CALL GetVideoMode Before using this routine!
  245.  
  246.     Input
  247.       AH      = Top Row
  248.       AL      = Left Column
  249.       BH      = Number of rows
  250.       BL      = Number of columns
  251.       DS:SI   = Memory Area of image
  252.  
  253.     Modifies
  254.       SI
  255.  
  256.  
  257.   CursorOff
  258.   ---------
  259.     This procedure simply turns the Cursor off
  260.  
  261.  
  262.   CursorOn
  263.   --------
  264.     This procedure simply turns the Cursor on
  265.  
  266.  
  267. Disclaimer
  268. ----------
  269.  
  270.   The current status of these routines is public domain.  Author makes no
  271.   claims to the usefullness of these routines and cannot be held responsible
  272.   for any situation resulting from the use of these routines.
  273.  
  274.   - David Bennett
  275.  
  276.